﻿using System.ComponentModel.DataAnnotations;
using System.Data.Entity.ModelConfiguration;
using Planisoft.Entities;

namespace Planisoft.DAO.Mapping
{
    public class ValRegPensCabMap : EntityTypeConfiguration<ValRegPensCab>
    {
        public ValRegPensCabMap()
        {
            // Primary Key

            this.HasKey(t => t.IdRP);

            //Poperties

            this.Property(t => t.anio)
                .IsRequired();

            this.Property(t => t.mes)
                .IsRequired();

            this.Property(t => t.Descripcion)
                .HasMaxLength(250);

            // Table & Column Mappings
            this.ToTable("ValRegPensCab");
            this.Property(t => t.IdRP).HasColumnName("IdRP");
            this.Property(t => t.anio).HasColumnName("anio");
            this.Property(t => t.mes).HasColumnName("mes");
            this.Property(t => t.Descripcion).HasColumnName("Descripcion");
        }
    }
}
